Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: tools/bpf/bpftool: fix buffer handling in get_fd_type()
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 98857d1
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 6417ca8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: e4980fa
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: c9110e6
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: abc8a95
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 929adf8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 2d92ef7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: b338cf8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 9621eb6
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

The current check "if (n == sizeof(buf))" is incorrect for detecting
buffer overflow from readlink(). When readlink() fills the entire
buffer, it returns sizeof(buf) but does not null-terminate the string,
leading to potential buffer overrun in subsequent string operations.

Fix by changing the condition to "n >= sizeof(buf)" to properly detect
when the buffer is completely filled, ensuring space is reserved for
null termination.

Signed-off-by: Kaushlendra Kumar <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: e12873e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=997512 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants